package cn.appsys.tools;

public class PageSupport {
	private Integer totalPage;			//总页数
	private Integer totalCount;			//总记录数
	private Integer currentPage;		//当前页
	private Integer rowPage;			//每页显示的行数
	
	
	public Integer getTotalCount() {
		return totalCount;
	}
	public void setTotalCount(Integer totalCount) {
		this.totalCount = totalCount;
	}
	public Integer getCurrentPage() {
		return currentPage;
	}
	public void setCurrentPage(Integer currentPage) {
		this.currentPage = currentPage;
	}
	public Integer getTotalPage() {
		return totalPage;
	}
	public void setTotalPage(Integer totalPage) {
		this.totalPage = totalPage;
	}
	public Integer getRowPage() {
		return rowPage;
	}
	public void setRowPage(Integer rowPage) {
		this.rowPage = rowPage;
	}
	
	public PageSupport(Integer totalCount, Integer currentPage, Integer rowPage) {
		super();
		this.totalCount = totalCount;
		this.currentPage = currentPage;
		this.rowPage = rowPage;
		if (this.totalCount % this.rowPage == 0) {
			this.totalPage = this.totalCount / this.rowPage;
		}else if(this.totalCount % this.rowPage > 0) {
			this.totalPage = (this.totalCount / this.rowPage)+1;
		}
	}
	public PageSupport() {
		super();
		// TODO Auto-generated constructor stub
	}
}
